﻿package command {
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	public class NewCommand implements ICommand {
		private var inputField:TextField;
		private var text:String;
		
		public function NewCommand(inputField:TextField, text:String):void {
			this.inputField = inputField;
			this.text = text;
		}
		
		public function redo():void {
			inputField.text = "";
		}
		public function undo():void {
			inputField.htmlText = text;
		}
	}
}